<?php
	session_start();
	$lang=$_SESSION['lang'];
	if($lang=='')
			$lang='EN';
	if ( !isset($_REQUEST['page'] ))
	{
    	$page = 1 ;
	}else{
		$page = $_REQUEST['page'] ;
	}
	$rows_per_page = 20;
	$page_start = ( $page - 1 ) * $rows_per_page; 
	$page_end = $page * $rows_per_page;
	
	include("operations/get_lang.php");
	$value = getlang();
	include($value);
	
	include 'operations/connection.php';
	
	$content = "content-accountant/accountant-search-SearchPurchase-content.php";
	if (isset($_REQUEST['content'])){
		
		$content = "content-accountant/".$_REQUEST['content'].".php";
	}
	
	
	
	if (isset($_REQUEST['action']))
		$action = $_REQUEST['action'];	
	if (isset($_REQUEST['id']))
		$id = $_REQUEST['id'];
	
	if (isset($_REQUEST['type'])){
		$type = $_REQUEST['type'];
		
		if($type==7)
			$content =  'content/view-form7-content.php';
		else if ($type==12)
			$content =  'content/view-form12-content.php';
		else if ($type==13)
			$content =  'content/view-form13-content.php';
		else if ($type==15)
			$content = 'content/view-form15-content.php';
		else if ($type ==14)
			$content =  'content/view-form14-content.php';
		else if ($type ==16)
			$content =  'content/view-form16-content.php';
		else if ($type ==17)
			$content =  'content/view-form17-content.php';
		else if ($type ==11)
			$content =  'content/view-form11-content.php';
	}
		
	
	if(!$_SESSION['user'])
	{
		header( 'Location: login.php' );
	}
	else 
	{		
		$username = $_SESSION['fullname'];
		$id_employee = $_SESSION['IDEmployee'];
	}
	 echo $_SESSION['back']; 
	
	$title = $_SESSION['browser'];
	
	require("MainTemplate.php");
?>